##table 7: private unsecured loans##

#bpdl: CRS#

alpha=1/3;


K_u = 43000;

K_l = 25000;
R = 1.04;
A = K_u^(1-alpha)*R/alpha;

MR = alpha*A*K_l^(alpha-1);

R_o = c(1.15,1.2,1.25);
lambda<-numeric();

for (i in 1:3) {
R_oi<-R_o[i];

K_oi = (R_oi/(alpha*A))^(1/(alpha-1))-K_l;
lambdai = ((A*K_u^alpha - R*K_u)-(A*(K_l+K_oi)^alpha - R*K_l - R_oi*K_oi))/K_u;
lambda<-c(lambda,lambdai)
};

#bpdl: DRS#
beta = 1/3;
gamma=0.83;

alpha=beta*gamma/(1-(1-beta)*gamma);


K_u = 43000;

K_l = 25000;
R = 1.04;
A = K_u^(1-alpha)*R/alpha;

MR = alpha*A*K_l^(alpha-1);

R_o = c(1.15,1.2,1.25);
lambda<-numeric();

for (i in 1:3) {
R_oi<-R_o[i];

K_oi = (R_oi/(alpha*A))^(1/(alpha-1))-K_l;
lambdai = ((A*K_u^alpha - R*K_u)-(A*(K_l+K_oi)^alpha - R*K_l - R_oi*K_oi))/K_u;
lambda<-c(lambda,lambdai)
}


#eidl: CRS#


alpha=1/3;


K_u = 42500;

K_l = 25000;
R = 1.04;
A = K_u^(1-alpha)*R/alpha;

MR = alpha*A*K_l^(alpha-1);

R_o = c(1.15,1.2,1.25);
lambda<-numeric();

for (i in 1:3) {
R_oi<-R_o[i];

K_oi = (R_oi/(alpha*A))^(1/(alpha-1))-K_l;
lambdai = ((A*K_u^alpha - R*K_u)-(A*(K_l+K_oi)^alpha - R*K_l - R_oi*K_oi))/K_u;
lambda<-c(lambda,lambdai)
}

#eidl: DRS#


beta = 1/3;
gamma=0.83;

alpha=beta*gamma/(1-(1-beta)*gamma);


K_u = 42500;

K_l = 25000;
R = 1.04;
A = K_u^(1-alpha)*R/alpha;

MR = alpha*A*K_l^(alpha-1);

R_o = c(1.15,1.2,1.25);
lambda<-numeric();

for (i in 1:3) {
R_oi<-R_o[i];

K_oi = (R_oi/(alpha*A))^(1/(alpha-1))-K_l;
lambdai = ((A*K_u^alpha - R*K_u)-(A*(K_l+K_oi)^alpha - R*K_l - R_oi*K_oi))/K_u;
lambda<-c(lambda,lambdai)
}


#covideidl: CRS#


alpha=1/3;


K_u = 40000;

K_l = 25000;
R = 1.0375;
A = K_u^(1-alpha)*R/alpha;

MR = alpha*A*K_l^(alpha-1);

R_o = c(1.15,1.2,1.25);
lambda<-numeric();

for (i in 1:3) {
R_oi<-R_o[i];

K_oi = (R_oi/(alpha*A))^(1/(alpha-1))-K_l;
lambdai = ((A*K_u^alpha - R*K_u)-(A*(K_l+K_oi)^alpha - R*K_l - R_oi*K_oi))/K_u;
lambda<-c(lambda,lambdai)
}

#covideidl: DRS#


beta = 1/3;
gamma=0.83;

alpha=beta*gamma/(1-(1-beta)*gamma);


K_u = 40000;

K_l = 25000;
R = 1.0375;
A = K_u^(1-alpha)*R/alpha;

MR = alpha*A*K_l^(alpha-1);

R_o = c(1.15,1.2,1.25);
lambda<-numeric();

for (i in 1:3) {
R_oi<-R_o[i];

K_oi = (R_oi/(alpha*A))^(1/(alpha-1))-K_l;
lambdai = ((A*K_u^alpha - R*K_u)-(A*(K_l+K_oi)^alpha - R*K_l - R_oi*K_oi))/K_u;
lambda<-c(lambda,lambdai)
}



